var block_name = "yuanshi";
function drawRockCircle(x, y, z, r, density)
{
    var PI = 2*3.1416;
    var piece = PI / density;
    var new_x,new_y,new_z;
    
    for(var i = 0;i < PI;i+=piece)
    {
        new_x = x + (r * math.cos(i));
        //new_y = y;
        new_z = z + (r * math.sin(i));
        if(world.getBlock(new_x,y,new_z) != "air")
            world.GenBlock(block);
    }
}

function drawHole(x, y, z, r, density)
{
    var piece = r / density;
    var new_y = y;
    for(var i = piece;i < r;i+=piece)
    {
        drawRockCircle(x, new_y, z, i, density);
        new_y++;
        Thread.Sleep(1000);
    }
}
var angle1;//l在xz平面上的投影与x轴的夹角
var angle2;//l与xz平面的夹角
var angle3;//
var angle4;//
new_x = x + (xz_l*Math.cos(angle1));
new_z = z + (xz_l*Math.sin(angle1));
new_y = y + (l*Math.cos(angle2));

var radius;
var rotate_offset;
r_x = new_x + (r * Math.cos(angle2) * Math.cos(raduius));
r_z = new_z + (r * Math.sin(angle2) * Math.sin(raduius));
r_y = new_y + (r * Math.sin(radius) * Math.sin(angle1));


var address = "http://10.173.50.76";
var user = "F8025223a";
var password = "TOTCA605";
var path = "/TOTCA605/成型厂/生技";

